import { observable, action } from 'mobx';
import { ComsStore } from './tables/common';
import { WeaLocaleProvider } from 'ecCom';

const getLabel = WeaLocaleProvider.getLabel;

export class ShareStore extends ComsStore {
  @observable title = getLabel(18037, '批量共享');
  @observable showResult = false;
  @observable showSearchAd = false;
  @observable selectedTreeKeys = [];
  @observable showShareModal = false;
  @observable tabPath = [];
  @observable collapse = false;

  @action
  setState = (params = {}) => {
    Object.keys(params).forEach((key) => {
      this[key] = params[key];
    });
    return this;
  }
}
